package collection;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target({ElementType.TYPE,ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
 @interface A1 {
    String value() default "hello default";
}

@A1(value = "nimei")
public class annotation1 {

    public static void main(String[] args) {
        Class<?> aClass = annotation1.class;
        A1 annotation = aClass.getAnnotation(A1.class);
        System.out.println(annotation.value());
    }
}
